﻿// JScript File


function CreateXmlHttp()
{
    var xmlhttp = false;
    
    try
    {
        xmlhttp = new ActiveXObject("Msxml2.XmlHttp");        
    }
    catch (e)
    {
       try
       {
            xmlhttp = new ActiveXObject("MSXML.XMLHTTP");
       }
       catch (e2)
       {
            xmlhttp = false;
       }
    }
    
    if ( !xmlhttp && typeof XMLHttpRequest != 'undefined')
    {
        xmlhttp = new XMLHttpRequest();
    }
    
    return xmlhttp;
}


function CreateXmlDOM()
{
    var xdoc = false;
    
    try
    {
        xdoc = new ActiveXObject("Msxml2.DOMDocument");
    }
    catch (e)
    {
        try
        {
            xdoc = new ActiveXObject("MSXML.DOMDocument");
        }
        catch(e2)
        {
            xdoc = false;
        }
    }
    
    if (!xdoc && document.implementation.createDocument)
    {         
        xdoc = document.implementation.createDocument("","",null);
    }
    
    return xdoc;
}

